package com.bjgzy.courselive.di.module;


import com.bjgzy.courselive.mvp.contract.CourseIntroductionContract;
import com.bjgzy.courselive.mvp.model.CourseIntroductionModel;
import com.jess.arms.di.scope.ActivityScope;

import dagger.Module;
import dagger.Provides;

/**
 * @author xubo
 * @date 2018-8-27 14:58:36
 */
@Module
public class CourseIntroductionModule {
    private CourseIntroductionContract.View view;

    /**
     * 构建CourseIntroductionModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public CourseIntroductionModule(CourseIntroductionContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    CourseIntroductionContract.View provideCourseIntroductionView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    CourseIntroductionContract.Model provideCourseIntroductionModel(CourseIntroductionModel model) {
        return model;
    }
}